﻿using System.Web.Mvc;

namespace DxMvcApplication.Areas.Administrator
{
    public class AdministratorAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "Administrator";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "Administrator_default",
                "a",
                new { action = "Index", controller = "Admin", id = UrlParameter.Optional });

            context.MapRoute(
            "Administrators_detail", "a/detail/{controller}/{Id}",
            new { controller = "Admin", action = "Detail", Id = UrlParameter.Optional });

            context.MapRoute(
            "Administrators_index", "a/index/{controller}/{Id}",
            new { controller = "Admin", action = "Index", Id = UrlParameter.Optional });            

            context.MapRoute(
                "Administrators_default1",
                "a/{controller}/{action}",
                new { action = "Index" });
        }
    }
}
